
import styles from './index.less'

import React, { useState } from 'react';
import { Table, Input, InputNumber, Popconfirm, Form, Typography, Space, Tag } from 'antd';

function Category() {

  const columns = [
    {
      title: '分类名称',
      dataIndex: 'name',
      key: 'name',
      align: "center"
    },
    {
      title: '图片',
      dataIndex: 'age',
      key: 'age',
      align: "center"
    },
    {
      title: '状态',
      dataIndex: 'address',
      key: 'address',
      align: "center"
    },
    {
      title: '排序号',
      key: 'tags',
      dataIndex: 'tags',
      align: "center",
    },
    {
      title: '操作',
      key: 'action',
      dataIndex: 'action',
      align: "center",
      render: () => (
        <Space size="middle">
          <div className={styles.revise}>
            <span>&nbsp;修改</span>
          </div>
          <div className={styles.remove}>
            <span>&nbsp;删除</span>
          </div>
        </Space>
      ),
    },
  ];

  const data = [
    {
      key: '1',
      name: 'John Brown',
      age: 32,
      address: 'New York No. 1 Lake Park',
      tags: ['nice', 'developer'],
    },
    {
      key: '2',
      name: 'Jim Green',
      age: 42,
      address: 'London No. 1 Lake Park',
      tags: ['loser'],
    },
    {
      key: '3',
      name: 'Joe Black',
      age: 32,
      address: 'Sidney No. 1 Lake Park',
      tags: ['cool', 'teacher'],
    },
  ];


  return (
    <div className={styles.category}>
      <div className={styles.btn}>
        <button className={styles.btnAdd}><i>+</i> 新增</button>
      </div>
      <div>
        <Table pagination={false} bordered={true} columns={columns} dataSource={data} />
      </div>
    </div>
  );
}
export default Category